<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=], initial-scale=1.0">
    <title>背景半透明</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            background-color: black;
            background: rgba(0,0,0,0.1);

        }
    </style>
</head>
<body>
    <div>内容不受影响，只改变背景半透明</div>
</body>
</html>